1
Easy2Siksha
GNDU Queson Paper - 2021
Bachelor of Computer Applicaon (BCA) 5st Semester
WEB TECHNOLOGIES
Paper-III
Time Allowed – 3 Hours Maximum Marks-75
Note :- Aempt FIVE Queson in all. All Quesons carry equal marks .
1.Write any ten essenal features of a good website of a university.
2.Give dierences between client side and server side and server side programming. Which
languages are used for both ? Give an example of both.
3.What is server side programming ? Which are various dierences between ASP and JSP ?
4.Explain in-built funcon (with example) of PHP related with Strings, Arrays and Files.
5.Explainn DDL and DML statements of My SQL. How does My SQL dier from Oracle ?
6. What is error-handling ? Explain error-handling features of PHP. Give examples.
7.What is cookie ? What is its use ? Explain PHP in built funcons related with cookies.
8.Explain general architecture of e-commerce website. Which technologies are used in developing
e-commerce web site ?
2
Easy2Siksha
GNDU ANSWER PAPER-2021
Bachelor of Computer Applicaon (BCA) 5st Semester
WEB TECHNOLOGIES
1.Write any ten essenal features of a good website of a university.
Ans: Creang a good university website is crucial for providing a posive online experience to
students, faculty, sta, and visitors. Here are ten essenal features that make a university website
eecve and user-friendly:
1. **Clear Navigaon:** The website should have a well-organized menu with easily accessible links
to important secons like admissions, academics, campus life, and contact informaon. A search bar
can also help users nd specic informaon.
2. **Mobile-Friendly Design:** Ensure the website is responsive and works seamlessly on various
devices, including smartphones and tablets, as many users browse on mobile.
3. **Up-to-Date Informaon:** Keep all informaon current. Outdated content can frustrate users
and make your university seem less reliable.
4. **Admissions Informaon:** Prospecve students should nd comprehensive details about
admission requirements, applicaon deadlines, and procedures. Include downloadable applicaon
forms.
5. **Academic Programs:** Provide informaon about all academic programs, including course
descripons, faculty details, and any research opportunies.
6. **Campus Maps:** Include interacve campus maps that help users navigate the university.
Highlight key locaons like classrooms, oces, libraries, and recreaonal areas.
7. **Events Calendar:** A calendar showcasing upcoming events, including academic schedules,
campus acvies, and important dates, keeps everyone informed.
8. **Resources for Current Students:** Oer resources like academic calendars, student portals, and
access to e-learning plaorms. This can help students manage their academic lives eecvely.
3
Easy2Siksha
9. **Contact Informaon:** Display contact details for key university personnel, departments, and
support services, making it easy for users to get in touch.
10. **Accessibility:** Ensure that the website is accessible to individuals with disabilies by
providing features like alt text for images and readable fonts.
By incorporang these features, a university website can provide a user-friendly, informave, and
trustworthy plaorm for students, sta, and the wider community. Regularly updang the website
and seeking user feedback can help maintain its eecveness and relevance.
2.Give dierences between client side and server side and server side programming.
Which languages are used for both ? Give an example of both.
Ans: Client-side and server-side programming are two fundamental approaches in web
development, each serving dierent purposes and using disnct languages. Here's a simple
explanaon of their dierences and examples of languages used for both:
1. Client-side Programming
Client-side programming refers to the development of code and scripts that run on the user's web
browser, rather than on the server. It is a crucial aspect of web development and is responsible for
creang interacve and dynamic user interfaces. In client-side programming, the code is executed on
the user's device, allowing for faster and more responsive user experiences.
Key technologies and languages associated with client-side programming include:
1. HTML (Hypertext Markup Language): HTML is the standard markup language for creang
the structure of web pages. It provides a way to dene the elements on a webpage, such as
headings, paragraphs, images, and links.
2. CSS (Cascading Style Sheets): CSS is used to style the HTML elements and control their
layout. It allows developers to dene the visual presentaon of a web page, including
aspects like fonts, colors, spacing, and posioning.
3. JavaScript: JavaScript is a scripng language that enables client-side interacvity. It allows
developers to manipulate the Document Object Model (DOM) dynamically, making it
possible to update content, handle user input, and create responsive interfaces. JavaScript is
a key component for building modern web applicaons
4. jQuery: jQuery is a fast and lightweight JavaScript library that simplies tasks like DOM
manipulaon, event handling, and AJAX (Asynchronous JavaScript and XML) requests. While
its usage has declined with the rise of modern JavaScript frameworks, it played a signicant
role in simplifying web development in the past.
5. React, Angular, and Vue.js:These are popular JavaScript frameworks for building user
interfaces. They allow developers to create reusable components and manage the state of an
applicaon eciently. React is maintained by Facebook, Angular by Google, and Vue.js is an
independent open-source project
4
Easy2Siksha
6. Bootstrap: Bootstrap is a front-end framework that simplies the design of responsive and
mobile-friendly websites. It includes pre-designed components and styles that developers
can use to quickly build a visually appealing user interface.
7. Ajax (Asynchronous JavaScript and XML): Ajax is a technique that allows web pages to be
updated asynchronously by exchanging small amounts of data with the server behind the
scenes. This enables smoother and faster user interacons without requiring a full page
reload.
8. WebAssembly (Wasm): While not a language itself, WebAssembly is a binary instrucon
format that enables high-performance execuon of code on web browsers. It allows
languages like C, C++, and Rust to be compiled to a format that can run in the browser
alongside JavaScript
Client-side programming is essenal for creang dynamic and interacve web applicaons, providing
a seamless user experience by reducing the need for constant communicaon with the server and
allowing more processing to occur on the user's device.
2. Server Side Programming :
Server-side programming is like having a waiter at a restaurant. Imagine you go to a restaurant, and
you sit at a table. You, as the customer, want to order some food. Instead of going to the kitchen
(which is like the server or computer), you tell your order to the waiter (which is like the server-side
program).
In the digital world, when you use a website or an app, there's a lot happening behind the scenes.
The server is like the kitchen, where all the data and informaon are stored and processed. The
server-side program is like the waiter, taking your requests (such as opening a webpage or subming
a form) and bringing back the results from the kitchen (sending you the requested data).
Here are some key points to simplify server-side programming:
Client and Server Interacon:
Imagine you're at a drive-thru. You (the client) place an order by talking into the microphone. The
person inside (the server) takes your order, prepares it, and gives it back to you. In the digital world,
this communicaon happens between your device (like a computer or smartphone) and the server.
1. Processing Requests:
When you click on a link or submit a form on a website, your request travels to the server.
The server-side program receives this request, processes it (like fetching data from a
database or performing some calculaons), and sends back the result to your device.
2. Dynamic Content:
Think of a restaurant menu that changes based on the me of day or the availability of
ingredients. Similarly, server-side programming allows websites and apps to show dynamic
content. The server can generate dierent responses based on the user's request or the
current state of the applicaon.
3. Database Interacon:
Consider a chef consulng a recipe book to prepare your meal. In server-side programming,
the server oen interacts with a database, which is like a digital recipe book. It stores and
retrieves data, ensuring that the server can provide the informaon you need.
5
Easy2Siksha
4. Security Measures:
In a restaurant, you trust that the waiter will bring you the right order. Similarly, server-side
programming includes security measures to ensure that data exchanges between your device and
the server are safe and protected from unauthorized access.
5. Eciency:
Just as a good waiter makes sure you get your food quickly, server-side programming aims for
eciency. It involves opmizing code and processes to deliver a smooth and fast experience for
users.
6. Updates and Maintenance:
Think of the restaurant sta updang the menu or xing a broken stove. Similarly, server-side
programming involves maintaining and updang the server-side code to improve performance,
x bugs, and add new features.
In summary, server-side programming is like the behind-the-scenes work in a restaurant. It involves
handling requests, processing data, and ensuring that users get the informaon they need when
using websites or apps. Just like a waiter at a restaurant makes your dining experience smooth,
server-side programs make your digital interacons seamless.
Here are key aspects and technologies associated with server-side programming:
1. **Server-Side Languages:**
PHP:A server-side scripng language widely used for web development. PHP is embedded in
HTML and is known for its simplicity and ease of integraon with databases.
Python (Django, Flask): Python is a versale language used for various applicaons, including
web development. Django and Flask are popular Python frameworks for building web
applicaons.
Ruby (Ruby on Rails):Ruby is another scripng language, and Ruby on Rails is a framework
that simplies the development of database-backed web applicaons.
Node.js (JavaScript):While JavaScript is tradionally a client-side language, Node.js allows
developers to use JavaScript on the server side. It is parcularly well-suited for building
scalable and real-me applicaons.
2. Databases:
MySQL, PostgreSQL, MongoDB:** These are examples of databases that store and manage data on
the server. MySQL and PostgreSQL are relaonal databases, while MongoDB is a NoSQL database
that stores data in a JSON-like format.
3. Server-Side Frameworks:
Express.js (for Node.js): A minimal and exible Node.js web applicaon framework that
provides a robust set of features for web and mobile applicaons.
Django (for Python): A high-level Python web framework that encourages rapid
development and clean, pragmac design.
6
Easy2Siksha
Ruby on Rails (for Ruby): A full-stack web applicaon framework wrien in Ruby that follows
the Model-View-Controller (MVC) paern.
4. Security:
- Server-side programming is crucial for implemenng security measures to protect against
common web vulnerabilies, such as SQL injecon, cross-site scripng (XSS), and cross-site request
forgery (CSRF).
5. Session Management and Authencaon:
- Server-side programming is responsible for managing user sessions and implemenng
authencaon mechanisms to ensure secure access to resources
Server-side programming and client-side programming work together to create dynamic and
interacve web applicaons. The server-side handles the business logic, database interacons, and
security, while the client-side takes care of the user interface and interacvity. The communicaon
between these two sides is oen facilitated by APIs.
Example:
Suppose you have a website for an online store. The client-side code (HTML, CSS, and JavaScript) is
responsible for displaying the product informaon, allowing you to lter products, and adding items
to your shopping cart. When you click "Add to Cart," the client-side code communicates with the
server-side code.
The server-side code (let's say it's wrien in Python) receives your request, checks the product
availability, updates your shopping cart in the database, and sends back a response. It also handles
user authencaon and manages the overall funconality of the online store
In summary, client-side programming deals with the user interface and interacons in the web
browser, while server-side programming manages the server's logic, data processing, and
communicaon with the client. These two types of programming work together to create a complete
and dynamic web experience.
3.What is server side programming ? Which are various dierences between ASP and JSP ?
Ans:Server-side programming is a type of computer programming where the code is executed on a
web server rather than on the user's device (like a computer or smartphone). It is a fundamental part
of web development, enabling websites to perform complex tasks and deliver dynamic content to
users. When you visit a website and interact with it, much of what happens behind the scenes is
server-side programming.
ASP (Acve Server Pages) and JSP (JavaServer Pages) are two popular technologies for server-side
programming, but they have some key dierences:
1. Technology Stack:
o ASP is developed by Microso and primarily used with their Windows Server and Internet
Informaon Services (IIS).
7
Easy2Siksha
o JSP is based on Java and is plaorm-independent, making it compable with various web
servers.
2. Language:
o ASP uses languages like VBScript or JScript for scripng.
o JSP uses Java, which is known for its portability and strong support in the enterprise world.
3. Ease of Learning:
o ASP is generally considered easier for beginners due to its simpler syntax and extensive
documentaon.
o JSP, being based on Java, can be more challenging for beginners but oers greater exibility
for complex applicaons.
4. Performance:
o ASP can be less ecient than JSP because it's ed to the Windows plaorm and may require
more server resources.
o JSP can be more ecient due to Java's opmizaon and plaorm-independence.
5. Ecosystem:
o ASP is closely integrated with other Microso technologies, making it a good choice for
organizaons that use a Microso-centric stack.
o JSP is part of the Java ecosystem, which is widely adopted in enterprise environments, and it
can easily integrate with other Java-based technologies.
6. Community and Support:
o ASP has a strong community and support, especially for Windows-based web development.
o JSP benets from the vast Java community and a wealth of open-source libraries and
frameworks.
In summary, server-side programming is essenal for creang dynamic web applicaons. ASP and JSP
are two opons, with ASP being more accessible for Windows-based setups and JSP being a versale
choice with a strong Java ecosystem. The choice between them depends on your specic project
requirements and your exisng technology stack.
4. Explain in-built funcon (with example) of PHP related with Strings, Arrays and Files.
Ans: Certainly! PHP is a versale programming language that oers a wide range of built-in funcons
to work with strings, arrays, and les. I'll explain some of the most commonly used funcons for each
of these data types with simple examples.
8
Easy2Siksha
String Funcons:
strlen(): This funcon is used to nd the length (number of characters) of a string.
Example:
str_replace(): This funcon is used to replace a specic substring with another substring in a
given string.
Example:
1. Array Funcons:
array_push(): This funcon adds one or more elements to the end of an array.
Example:
array_pop(): This funcon removes and returns the last element from an array.
Example:
9
Easy2Siksha
3. File Funcons:
le_get_contents(): This funcon reads the contents of a le and returns it as a string.
Example:
le_put_contents(): This funcon writes data to a le. It can create a new le or overwrite
the content of an exisng one.
Example:
These are just a few examples of the many built-in funcons in PHP that can help you work with
strings, arrays, and les. These funcons simplify common operaons and are essenal for web
development and other PHP applicaons.
5.Explainn DDL and DML statements of My SQL. How does My SQL dier from Oracle ?
Ans: DDL and DML statements in MySQL and highlight the dierences between MySQL and Oracle
in easy-to-understand language
DDL (Data Denion Language) in MySQL:
DDL statements in MySQL are used for dening, altering, and managing the structure of your
database. They don't deal with the actual data but focus on the database schema. Here are some
common DDL statements in MySQL:
1. CREATE: This statement is used to create new database objects like tables, indexes, or views.
2. ALTER: It is used to modify the structure of exisng database objects. You can add or remove
columns, change data types, or rename objects.
3. DROP: DROP is used to delete exisng database objects, such as tables, indexes, or even the enre
database.
10
Easy2Siksha
4. TRUNCATE: This is used to delete all the data from a table but keep the table structure intact.
DML (Data Manipulaon Language) in MySQL:
DML statements in MySQL deal with the actual data stored in the database. They allow you to insert,
update, and retrieve data from your tables. Here are some common DML statements in MySQL:
1. SELECT: SELECT is used to retrieve data from one or more tables. It allows you to specify which
columns you want to retrieve and apply lters to the data.
2. INSERT: INSERT is used to add new rows of data into a table.
3. UPDATE: UPDATE allows you to modify exisng data in a table. You can specify which rows to
update and what values to set.
4.DELETE: DELETE is used to remove rows from a table based on a specied condion.
Dierences between MySQL and Oracle:
1. Licensing and Cost:One of the most signicant dierences is the licensing and cost. Oracle is
known for being expensive and has complex licensing models, while MySQL is open-source and
generally free to use
2. Ease of Use:MySQL is oen considered easier to set up and use, especially for small to medium-
sized applicaons. Oracle, on the other hand, can be more complex and requires a steeper learning
curve.
3. Features:Oracle oers a broader range of features and capabilies, making it suitable for large
enterprise-level applicaons. MySQL is more popular for web applicaons and smaller-scale projects.
4. Performance: Oracle tends to have beer performance and scalability opons, but this comes at a
higher cost. MySQL can handle most common workloads eecvely.
5. Community and Support: MySQL has a robust open-source community and various online
resources for support. Oracle has extensive commercial support but at a signicant cost.
6. Replicaon and High Availability:MySQL oers built-in replicaon and clustering features, but
Oracle provides more advanced opons for high availability and disaster recovery.
In summary, MySQL and Oracle both have their strengths and weaknesses. Your choice between the
two depends on the specic needs of your project, your budget, and your experse in managing the
database system.
11
Easy2Siksha
6. What is error-handling ? Explain error-handling features of PHP. Give examples.
Ans: Error handling in PHP is a crucial aspect of wring robust and reliable web applicaons. It
involves dealing with unexpected issues and excepons that can occur during the execuon of your
PHP code. Error handling helps you idenfy, report, and gracefully manage errors, ensuring your
applicaon doesn't crash or reveal sensive informaon to users. PHP provides several features to
handle errors eecvely.
1. Error Types:
Noces: These are non-crical issues like accessing undened variables. They won't halt the
script's execuon.
Warnings: More serious than noces, warnings might indicate problems but won't stop the
script.
Errors: These are crical issues that can stop the script's execuon if not handled.
Excepons: PHP supports structured excepon handling with `try`, `catch`, and `throw`. You
can create custom excepons to handle specic errors.
2. Displaying Errors:
PHP allows you to control how errors are displayed:
o display_errors: Set to "On" in development to show errors directly on the web page. Set to
"O" in producon to log errors without displaying them.
o error_reporng: Congure which types of errors are displayed and logged.
3. Logging Errors:
o Use `error_log()` to record errors in log les for later analysis.
o PHP can be congured to log errors in various ways, like to a le or a system log.
4. Custom Error Handling:
You can dene custom error handling funcons using `set_error_handler()` and
`set_excepon_handler()`. This allows you to control how errors are handled and logged. For
example:
12
Easy2Siksha
5. Excepon Handling:
PHP supports structured excepon handling for more complex error scenarios. For instance:
In summary, error handling in PHP involves idenfying, reporng, and managing dierent types of
issues that can occur in your code. By customizing error handling funcons, controlling error display,
and ulizing excepon handling, you can create robust PHP applicaons that gracefully handle errors,
ensuring a smoother user experience and easier debugging.
7.What is cookie ? What is its use ? Explain PHP in built funcons related with cookies.
Ans: A cookie is a small piece of data that a website stores on your computer or device when you
visit it. It's not an actual tasty cookie you can eat, but rather a text le with informaon. Cookies are
used by websites for several purposes:
1. Remembering Informaon: Cookies can store informaon like your login credenals, shopping
cart items, or website preferences. So, when you return to a website, it can recognize you and
provide a more personalized experience.
2. Tracking and Analycs: Websites use cookies to gather data about how you use their site. This
helps them understand user behavior, improve their services, and target adversements more
eecvely.
3.Session Management: Cookies can be used to maintain a session between your browser and the
website's server. This is crucial for acvies like online banking or email, where you need to stay
logged in.
4. User Tracking: Somemes, websites use cookies for tracking user acvity across dierent
websites. This is what allows you to see ads related to your interests, but it also raises privacy
concerns.
In PHP, a popular server-side scripng language for web development, there are built-in funcons to
work with cookies. Here are some of the key PHP funcons related to cookies:
13
Easy2Siksha
1. setcookie(): This funcon is used to set a cookie. It takes several parameters, such as the cookie
name, value, expiraon me, and path.
For example:
This code sets a cookie named "username" with the value "john_doe" that expires in one hour ("/"
species it's available across the enre website).
2. $_COOKIE: This is a superglobal array in PHP that holds all the cookies sent by the client. You can
access the value of a cookie like this:
3. isset(): You can use this funcon to check if a cookie is set before trying to access it. This is
important to avoid errors if the cookie doesn't exist:
4. unset(): To delete a cookie, you can use `unset()` and set its expiraon me in the past. This will
eecvely remove the cookie from the user's device:
Cookies are a powerful tool for web developers, but they should be used responsibly to respect user
privacy and provide a beer browsing experience.
8.Explain general architecture of e-commerce website. Which technologies are used in
developing e-commerce web site ?
Ans: Creang a successful e-commerce website involves a complex architecture that combines
various technologies to provide a seamless and secure shopping experience for users. Here's an easy-
14
Easy2Siksha
to-understand explanaon of the general architecture and the key technologies used in developing
an e-commerce website:
1. Front-End Development:
o User Interface (UI): This is what users see and interact with. It includes web pages, product
lisngs, and the shopping cart. Technologies like HTML, CSS, and JavaScript are used to
design and create these elements.
o Responsive Design: Websites need to work on dierent devices (desktop, tablet, and
mobile). Responsive design ensures that the site adapts to various screen sizes and
resoluons.
o User Experience (UX): Making the website user-friendly and easy to navigate is crucial. UX
designers use wireframes and prototypes to plan how the website will work.
o Content Management System (CMS): A CMS, like WordPress or Shopify, helps manage
content, products, and user data.
2. Back-End Development:
o Server: This is where the website's logic resides. Technologies like PHP, Python, Ruby, or
Node.js are used to build the server.
o Database: To store product informaon, customer data, and orders, databases like MySQL,
PostgreSQL, or MongoDB are employed
o Server-Side Frameworks: Frameworks like Django, Ruby on Rails, or Express.js simplify back-
end development, making it easier to manage data and user interacons.
o Security: Security is crical in e-commerce. Techniques like encrypon (HTTPS), rewalls, and
regular security audits help protect user data.
3. Payment Processing:
o Payment gateways like PayPal, Stripe, or Square are integrated to allow customers to make
secure transacons.
4. Inventory Management:
o E-commerce sites need a way to track and manage their products. Inventory management
soware helps ensure that products are in stock and up-to-date.
5. Search Funconality:
o To help users nd products quickly, search engines and lters are integrated. Elascsearch
and Solr are popular choices.
15
Easy2Siksha
6. Shopping Cart:
o The shopping cart stores products selected by the user unl they are ready to make a
purchase. It relies on cookies and databases.
7. User Accounts and Proles:
o Users can create accounts, save shipping informaon, and view order history. Technologies
like user authencaon and session management are used.
8. Order Processing:
o When a customer places an order, the website needs to handle order conrmaon,
payment processing, and inventory adjustments.
9. Content Delivery Networks (CDNs):
o CDNs are used to ensure fast loading mes by caching and serving website content from
servers located closer to the user
10. Analycs and Reporng:
o Tools like Google Analycs help track user behavior, sales, and website performance.
11. Mobile Applicaons:
o Many e-commerce websites also oer mobile apps for a beer shopping experience on
smartphones and tablets.
12. SEO (Search Engine Opmizaon):
o SEO pracces are implemented to improve the website's visibility in search engines.
In conclusion, e-commerce websites are a sophiscated blend of front-end design, back-end
development, security measures, and various integraons to create a user-friendly and secure
shopping experience. The specic technologies used may vary, but these are the fundamental
components of their architecture.
Note: This Answer Paper is totally Solved by Ai (Arcial Intelligence) So if You nd Any Error Or Mistake .
Give us a Feedback related Error , We will Denitely Try To solve this Problem Or Error. (Easy2Siksha)